Date: Mon, 16 Dec 1996 22:12:07 GMT
Server: NCSA/1.5
Content-type: text/html
Last-modified: Fri, 09 Feb 1996 12:51:22 GMT
Content-length: 4575


<html>
<head>
<title>
CS418 Lab 1
</title>
</head>

<body>
<h2><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/gifs/teapot.thumb.gif">
CS 418: Laboratory 1 </h2> 
<h2> Building a simple polygonal object. </h2>

<b> Introduction. </b>
<p>
The exercise is the design of geometric
objects by describing their vertices and faces.

<b><hr>Procedure:</b>
<p>
First you will need to download four files. To do this, click on
each of the filenames shown below.  When the text window opens, use the
"save as" option to put the file in your own directory. Name each file with
the same name as shown below.
<ul>
<li> <!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/MakePolyhedron.net"> MakePolyhedron.net </a>
<li> <!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/MakePolyhedron.cfg"> MakePolyhedron.cfg </a>
<li> <!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/2octahedron.net"> 2octahedron.net </a>
<li> <!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/2octahedron.cfg"> 2octahedron.cfg </a>
</ul>
<p>
After downloading the files, start DX then
open the program MakePolyhedron.net and execute it. Be sure to open the control
panel.  You should see a 
<!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/MakePolyhedron.image.gif"> tetrahedron </a>
in the Image window. The "options" menu in
the Image window contains a "view control" item, which in turn contains a "Mode"
 menu. Experiment with rotating and zooming the tetrahedron.  Use the control 
panel to choose a cube or octahedron shape. Note that the tetrahedron is defined
interactively as a pair of "Vectorlists" interactors, but that the other two shapes
are defined with list modules. Note also that any shape you make can be saved
in a file to be used later in another program (which can Import the file). It it
not necessary  to understand the program logic at this point (that is, you don't
 need to know what the Options, construct or replace module does) but you must
 be able to modify the defined shapes.
<p>
  The control panel has 
 <!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/MakePolyhedron.panel.gif">  interactors </a>
  to define the vertices and faces of a polyhedron.
   Edit the face list so that one of the faces in "inside out". Note that the
  "outward"  face of a polygon is defined as the side you see if you traverse the
  vertices in a counter-clockwise direction. Edit the face list and vertex list to
  make a single triangle.
<p>

Open and execute the "2octahedron.net". Open the control panel and vary the color

of one shape or the opacity of the other shape. Open the sequencer and click on
the
arrow to make a simple animation. Modify the Rotate module to animate
around the Z axis. This net serves as a very brief introduction to animation.
The image below shows one view generated by this program. 
<p>
 <a name="IM2">
<!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><img align=bottom src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/2octahedron.1.gif"> 
<hr>
<b> Assignment </b>
<p>
Modify the program MakePolyhedron to make a cube with one face that opens to show
 a propellor inside. The propeller should be made of four equilateral triangles
 sharing one edge and oriented 90 degrees apart. You will probably want to use
 the interactive lists to design this object. The cube opening should be controlled
  by a sequencer and the opening should be proportional to a sinusoidal function
  of time. Each different object you define will need to be connected to its own
  set of "option, construct, replace" modules. For instance, you might make the 
  propellor, cube (minus top) and the top as three objects which are then collected
  together. In this case you would need three sets of "option, construct, replace"
   modules. One of the inputs to the Color module is defined as "front colors" so
   that the back and front of objects will look different. For your modified program,
    change this parameter to "colors" so that both sides of objects will be colored.
    A single frame might look like the following image. 
    <p>
    <!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/BoxAndProp.image.gif">

<p>
Be ready to demo and explain your cube animation program in section.
You will have 10 minutes to do the demo. You should be ready to explain the
function of every module in the program. Some attention will be paid to program
layout. A very tangled, messy program will lose points. 
<p>
The
<!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/GradeGuides/Lab1.grade.ps"> Lab 1 grading guide </a>
will be filled out by a consultant during section to evaluate your work.
<p>
<!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/gifs/leftarrow.icon.gif">
Back to <!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/index.html"> Main Page </a>
<br>
<!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/gifs/rightarrow.icon.gif">
Go to <!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/lab2.html"> Lab 2</a>

 <P>
<hr>
Last modified, 1/17/96 B. Land.
<! Revision history:
	Original document: P.Maxfield, 10/94
>
<br>
<!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><IMG SRC="http://www.tc.cornell.edu/copyright.xbm">
<!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><A HREF="http://www.tc.cornell.edu/ctcCopyright.html"> 
<i>Copyright Statement </I></A>
</body> </html>

